<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="UTF-8">
	<title></title>
	<script th:src="@{/layui/layui.js}" type="text/javascript"></script>
	<link th:href="@{/layui/css/layui.css}" rel="stylesheet" />
	<style>
		.layui-elem-quote{
			border-left: 5px solid #1e9fff;
		}
		.layui-form-select dl dd.layui-this {
			background-color: #1e9fff;
			color: #fff;
		}
	</style>
</head>
<body>
<div class="layui-panel" style="padding: 8px;">
	<blockquote class="layui-elem-quote layui-border-blue">运费配置</blockquote>
	<div>
		<form class="layui-form layui-form-pane">
			<div class="layui-form-item">
				<div class="layui-inline">
					<label class="layui-form-label" style="width: 250px;">运费满减需最低消费</label>
					<div class="layui-input-inline"  style="width: 450px;">
						<input type="number" class="layui-input" name="freightFree" autocomplete="off" th:placeholder="${c.freightFree}" />
					</div>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-inline">
					<label class="layui-form-label" style="width: 250px;">运费满减不足所需运费</label>
					<div class="layui-input-inline"  style="width: 450px;">
						<input type="number" class="layui-input" name="freightCost" autocomplete="off" th:placeholder="${c.freightCost}" />
					</div>
				</div>
			</div>
			<div class="layui-form-item">
				<div style="text-align: center;">
					<a class="layui-btn layui-btn-normal" lay-submit="" lay-filter="submitBtn">
						<i class="layui-icon layui-icon-ok"></i>
						确定保存
					</a>
					<a class="layui-btn layui-btn-primary" id="cleanBtn">
						<i class="layui-icon layui-icon-fonts-clear"></i>
						清空重置
					</a>
				</div>
			</div>
		</form>
	</div>
</div>

<script>
	var $,form;
	layui.use(['jquery','form','layer'],function(){
		$ = layui.jquery;
		form = layui.form
		var layer = layui.layer;

		//提交表单
		form.on('submit(submitBtn)',function(data){
			var formData = data.field;
			$.ajax({
				type:'post',
				url: '/system/mcc/update',
				data:formData,
				dataType: 'json',
				success:function (result) {
					layer.msg(result.msg);
				}
			})
		})
	})
</script>
</body>
</html>
